try: 
    class __Dummy1(unicode): __slots__ = [ 'x' ]
    _SLOTS_VALID_IN_UNICODE_DERIVED = True
except TypeError:
    _SLOTS_VALID_IN_UNICODE_DERIVED = False

try: 
    class __Dummy2(str): __slots__ = [ 'x' ]
    _SLOTS_VALID_IN_STR_DERIVED = True
except TypeError:
    _SLOTS_VALID_IN_STR_DERIVED = False

if __name__ == '__main__':
    print "_SLOTS_VALID_IN_UNICODE_DERIVED=",_SLOTS_VALID_IN_UNICODE_DERIVED
    print "_SLOTS_VALID_IN_STR_DERIVED=",_SLOTS_VALID_IN_STR_DERIVED